/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PantallaMaterialesNuevoTipo.java
 *
 * Created on 18-may-2011, 22:44:45
 */
package interfacesGraficas.JDialogs;

import java.awt.Frame;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JTable;
import javax.swing.JTextField;

/**
 *
 * @author diego
 */
public class PantallaMaterialesNuevoTipo extends JDialog {

    /** Creates new form PantallaMaterialesNuevoTipo */
    public PantallaMaterialesNuevoTipo() {
        initComponents();
    }

    public PantallaMaterialesNuevoTipo(Frame owner) {
        super(owner);
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        panelNuevoTipo = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        txtCodigoTipo = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        txtTipoMat = new javax.swing.JTextField();
        panelTiposMateriales = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblTiposMateriales = new javax.swing.JTable();
        jToolBar1 = new javax.swing.JToolBar();
        btnGuardar = new javax.swing.JButton();
        btnEliminarTipoMat = new javax.swing.JButton();
        btnCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Nuevo Tipo");
        getContentPane().setLayout(new java.awt.GridBagLayout());

        panelNuevoTipo.setBorder(javax.swing.BorderFactory.createTitledBorder("Tipo"));
        panelNuevoTipo.setLayout(new java.awt.GridBagLayout());

        jLabel1.setText("Código");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 15, 0, 0);
        panelNuevoTipo.add(jLabel1, gridBagConstraints);

        txtCodigoTipo.setMaximumSize(new java.awt.Dimension(180, 27));
        txtCodigoTipo.setMinimumSize(new java.awt.Dimension(180, 27));
        txtCodigoTipo.setPreferredSize(new java.awt.Dimension(180, 27));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);
        panelNuevoTipo.add(txtCodigoTipo, gridBagConstraints);

        jLabel2.setText("Tipo Material");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
        gridBagConstraints.insets = new java.awt.Insets(10, 15, 0, 0);
        panelNuevoTipo.add(jLabel2, gridBagConstraints);

        txtTipoMat.setMaximumSize(new java.awt.Dimension(180, 27));
        txtTipoMat.setMinimumSize(new java.awt.Dimension(180, 27));
        txtTipoMat.setPreferredSize(new java.awt.Dimension(180, 27));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);
        panelNuevoTipo.add(txtTipoMat, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        getContentPane().add(panelNuevoTipo, gridBagConstraints);

        panelTiposMateriales.setBorder(javax.swing.BorderFactory.createTitledBorder("Tipos de Materiales"));
        panelTiposMateriales.setMinimumSize(new java.awt.Dimension(300, 200));
        panelTiposMateriales.setPreferredSize(new java.awt.Dimension(300, 200));

        jScrollPane1.setMaximumSize(new java.awt.Dimension(400, 250));
        jScrollPane1.setMinimumSize(new java.awt.Dimension(400, 250));
        jScrollPane1.setPreferredSize(new java.awt.Dimension(400, 250));

        tblTiposMateriales.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(tblTiposMateriales);

        javax.swing.GroupLayout panelTiposMaterialesLayout = new javax.swing.GroupLayout(panelTiposMateriales);
        panelTiposMateriales.setLayout(panelTiposMaterialesLayout);
        panelTiposMaterialesLayout.setHorizontalGroup(
            panelTiposMaterialesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTiposMaterialesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        panelTiposMaterialesLayout.setVerticalGroup(
            panelTiposMaterialesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTiposMaterialesLayout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 129;
        gridBagConstraints.ipady = 89;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        getContentPane().add(panelTiposMateriales, gridBagConstraints);

        jToolBar1.setRollover(true);
        jToolBar1.setMinimumSize(new java.awt.Dimension(12, 40));
        jToolBar1.setPreferredSize(new java.awt.Dimension(12, 40));

        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/utilidades/imagenes/iconos/Save_30.png"))); // NOI18N
        btnGuardar.setToolTipText("Guardar Tipo");
        jToolBar1.add(btnGuardar);

        btnEliminarTipoMat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/utilidades/imagenes/iconos/user-trash-30.png"))); // NOI18N
        btnEliminarTipoMat.setToolTipText("Eliminar Tipo");
        jToolBar1.add(btnEliminarTipoMat);

        btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/utilidades/imagenes/iconos/Log-out-30.png"))); // NOI18N
        btnCancelar.setToolTipText("Salir");
        jToolBar1.add(btnCancelar);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        getContentPane().add(jToolBar1, gridBagConstraints);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnEliminarTipoMat;
    private javax.swing.JButton btnGuardar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JPanel panelNuevoTipo;
    private javax.swing.JPanel panelTiposMateriales;
    private javax.swing.JTable tblTiposMateriales;
    private javax.swing.JTextField txtCodigoTipo;
    private javax.swing.JTextField txtTipoMat;
    // End of variables declaration//GEN-END:variables

    public JButton getBtnCancelar() {
        return btnCancelar;
    }

    public JButton getBtnGuardar() {
        return btnGuardar;
    }

    public JTextField getTxtCodigoTipo() {
        return txtCodigoTipo;
    }

    public JTextField getTxtTipoMat() {
        return txtTipoMat;
    }

    public JTable getTblTiposMateriales() {
        return tblTiposMateriales;
    }

    public JButton getBtnEliminarTipoMat() {
        return btnEliminarTipoMat;
    }
    
}
